<%@ page import="edu.xcdq.beans.User" %><%--
  Created by IntelliJ IDEA.
  User: huyuansong
  Date: 2021/11/8
  Time: 9:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <%
        User user=null;
        if(session.getAttribute("user")==null){
            response.sendRedirect("enter.jsp");
        }else{
            user=(User)session.getAttribute("user");
    %>
    欢迎您：<%=user.getUserName() %><br/>
    <%
        Object userCount = session.getServletContext().getAttribute("userCount");
    %>
    目前在线人数：<%=userCount.toString() %><br/>
    <a href="loginout.jsp">离开</a>
    <%
        }
    %>
</body>
</html>
